const mongoose = require("mongoose");
const Schema = mongoose.Schema;


mongoose.connect(`mongodb://127.0.0.1:27017/imgbase`, {
    useNewUrlParserL: true,
    useUnifiedTopology: true
});



let recommendShema = new Schema({
    //学号
    useID: {
        type: String,
        require: true,
    },
    //图片地址
    imgUrl: {
        type: String,
        require: true
    },
    // 尺寸
    size:{
        type: String,
        require:true
    },
    // 背景颜色
    bgc:{
        type: String,
        require:true
    },
    dataTime:{
        type:String,
        require:true
    },
    //姓名
    usename: {
        type: String,
        require: true
    },
    //年级
    grade: {
        type: String
    },
    //学院
    college: {
        type: String
    },
    //班级
    classes:{
        type:String
    }
});

let singlebase = mongoose.model("singlebase", recommendShema);

module.exports = {
    recommendTable: singlebase
}






